import React from 'react'
import { observer, Provider } from 'mobx-react'
import store from './stores/editActivityStore'
import EditActivity from'./modules/editActivity'
import {Spin} from 'antd'

class EditActivityIndex extends React.Component {
    constructor() {
        super()
    }
    state = { loading: false }
    toggle = (value) => {
        this.setState({ loading: value });
    }
    render() {
        return (
            <Spin spinning={this.state.loading}>
                <div>
                    <Provider  store={store}><EditActivity id={this.props.match.params.id} toggle={this.toggle} history={this.props.history}/></Provider>
                </div>
            </Spin>
        )
    }
}

export default EditActivityIndex